# $Id: PKGBUILD 81787 2012-12-30 02:12:34Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: dieghen89 <dieghen89@gmail.com>
# Contributor: Alessio 'Bl@ster' Biancalana <dottorblaster@gmail.com>

pkgname=docky
pkgver=2.1.4
pkgrel=2
pkgdesc="Full fledged dock application that makes opening common applications and managing windows easier and quicker"
url="http://wiki.go-docky.com/"
arch=('any')
license=('GPL')
depends=('gconf-sharp' 'libgnome-desktop-sharp' 'gnome-keyring-sharp' 'mono-addins' 'notify-sharp' 'rsvg2-sharp' 'wnck-sharp' 'hicolor-icon-theme' 'xdg-utils')
makedepends=('intltool' 'libgnome-sharp' 'gio-sharp')
install=$pkgname.install
source=("http://launchpad.net/$pkgname/2.1/$pkgver/+download/$pkgname-$pkgver.tar.xz"
        disable-network-check.patch
        systemd-support.patch)
md5sums=('770fe2872dc64a0211fd9666422e6627'
         '2384c070a8a90249fc22247f5f43c455'
         '462467fd87d895c150b82ab17d1d3341')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # https://bugs.launchpad.net/docky/+bug/734490
  patch -Np0 -i "$srcdir/disable-network-check.patch"

  # Add systemd support
  patch -Np1 -i "$srcdir/systemd-support.patch"

  ./configure --prefix=/usr --sysconfdir=/etc \
              --disable-schemas-install \
              --with-gconf-schema-file-dir=/usr/share/gconf/schemas
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  # Remove NetworkManager plugin, because it doesn't work
  rm "$pkgdir/usr/lib/docky/plugins/NetworkManager.dll"
}
